package com.aorise.mapper.camera;

import com.aorise.model.camera.*;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
* @Author:cat
* @Description 视频设备mybatis接口类
* @Date:Created in 2019-05-27
* @Modified By:
*/
@Mapper
@Component(value = "cameraMapper")
public interface CameraMapper {
    /**
     * @Author:cat
     * @Description 查询视频设备信息总条数
     * @params: map 查询条件Map
     * @Date:2019-05-27
     * @Return: Long 数据总条数
     * @Modified By:
     */
    Long getAllCameraListTotalByPage(Map<String, Object> map) throws DataAccessException;

    /**
     * @Author:cat
     * @Description 分页查询视频设备信息
     * @params: map 查询条件Map
     * @Date:2019-05-27
     * @Return: List<CameraModel> 视频设备集合
     * @Modified By:
     */
    List<CameraModel> getAllCameraListByPage(Map<String, Object> map) throws DataAccessException;

    /**
     * @Author:cat
     * @Description 根据条件查询视频设备信息(导出)
     * @params: map 查询条件Map
     * @Date:2019-05-29
     * @Return: List<CameraModel> 视频设备集合
     * @Modified By:
     */
    List<CameraModel> exportCamera(Map<String, Object> map) throws DataAccessException;

    /**
     * @Author:cat
     * @Description 根据条件查询视频设备详情
     * @params: map 查询条件Map
     * @Date:2019-05-27
     * @Return: CameraModel 视频设备信息
     * @Modified By:
     */
    CameraModel getCameraById(Map<String, Object> map) throws DataAccessException;

    /**
     * @Author:cat
     * @Description 新增视频设备信息
     * @params: cameraAddVO 视频设备信息
     * @Date:2019-05-27
     * @Return: Integer 影响行数
     * @Modified By:
     */
    Integer addCamera(CameraAddVO cameraAddVO) throws DataAccessException;

    /**
     * @Author:cat
     * @Description 修改视频设备信息
     * @params: cameraEditVO 视频设备信息
     * @Date:2019-05-27
     * @Return: Integer 影响行数
     * @Modified By:
     */
    Integer updateCamera(CameraEditVO cameraEditVO) throws DataAccessException;

    /**
     * @Author:cat
     * @Description 批量修改视频设备的入网状态、连接状态、异常类型、停机状态、坐标
     * @params: map 查询条件Map
     * @Date:2019-05-29
     * @Return: Integer 影响行数
     * @Modified By:
     */
    Integer updateCameraStatus(Map<String, Object> map) throws DataAccessException;

    /**
     * @Author:cat
     * @Description 根据筛选条件查询视频设备信息
     * @params: map 查询条件
     * @Date:2019-06-01
     * @Return: List<CameraModel> 视频设备信息集合
     * @Modified By:
     */
    List<CameraModel> getCameraList(Map<String, Object> map) throws DataAccessException;

    /**
     * @Author:cat
     * @Description 根据筛选条件查询视频设备信息总数
     * @params: map 查询条件Map
     * @Date:2019-06-20
     * @Return: Integer 数据总条数
     * @Modified By:
     */
    Integer getCameraTotal(Map<String, Object> map) throws DataAccessException;
}